Import the datasets
indiv: Subset of Colaus participants eligible for this
study (see selection procedure) within Lausanne.laus$extent: Boundary of the Lausanne area
(polygon).laus$sectors: Statistical sectors of Lausanne (for
mapping purpose only).env: Living environment (hectares)
characteristics.indiv <- load_participants(con)
## Number of participants in Lausanne: 3216
## Pourcentage of the study dataset: 79.64
laus <- load_boundaries(con)
env <- load_env()
Specify covariates
cov.indiv <- c("age", "sex", "swiss", "cohabiting", "education", "difficulties", "smoking", "drinking", "inactivity")
cov.env <- c("PTOT", "ENV_INDEX", "NO2", "PM25", "NOISE", "GREEN_SP", "N_ACC_PED", "SOC_ECO_INDEX", "SWISS", "UNEMPLOYMENT", "LOW_EDUC", "INCOME")
diab.data <- select_outcome(indiv, "diabetes", cov=cov.indiv)
## [1] "Outcome selected: diabetes"
## [1] "Prevalence: 10.2"
Visualize diabetes events
Explore the spatial density of diabetes.
compare_spatial_dens(diab.cases, diab.controls)
## Scott's rule bandwidth for cases
## sigma.x sigma.y
## 446.9534 386.2039
## Scott's rule bandwidth for controls
## sigma.x sigma.y
## 316.4127 266.7427
To construct the spatial density of diabetes, we used a two-dimensional product kernels using a Gaussian function and a bandwith defined by the Scott’s rule (see p.133-136, Waller and Gotway (2004) for more details). We applied an edge correction using the Jones-Diggle formula. The density function estimates suggest some local differences in the case and control patterns, especially near Montelly & Pontaise (high density of cases) and Chailly (high density of controls).
Log ratio of spatial densities.
Detect local clusters (see p.164-171, Waller and Gotway (2004) for more details). “Do cases and controls tend to occur in the same locations?” Assumption: bot case and control locations each represent a realization of a heterogeneous Poisson point process over the study area. We obtain a map indicating areas where events appear more or less likely to be cases than controls. Bandwith: We choosed a bandwith of 350m which is a compromise between the Scott’s rule estimated bandwith for cases and controls separatly.
diab.lrr <- log_ratio_spatial_dens(diab.events, sigma=350)
## case has been selected as the case group
In the last map, orange areas represent parts of the study area where cases are clustered relative to controls beyond what is expected according to the random labeling hypothesis (tolerance=0.9, nsim=999). For the diabetes in Lausanne, we confirm our suggestions that there are clusters of cases near Montelly and Pontaise, and a deficit of cases near Chailly. However, there is no evidence of global clustering (p=0.425).
Difference between K-functions of case and control processes.
Using K-functions, we are interested of the distance to which any observed clustering tends to occur, averaged over the entire study area. “Do cases tend to occur near other cases in the same manner that controls tend to occur near other controls?”
k_func_diff(diab.events)
## case has been selected as the case group
## case has been selected as the case group
## Generating 999 simulations by evaluating expression ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
##
## Done.
##
## Diggle and Chetwynd (1991) test for difference in K functions
##
## KD(r) = K_case(r) - K_control(r)
## case label: case
## control label: control
##
## null hypothesis: KD(r) = 0 for all r between 0 and 1299.884
## alternative hypothesis: KD(r) > 0 for at least one r between 0 and 1299.884
## test statistic: -6.016824
## p-value: 0.443
## nsim: 999
## simulation procedure: random labeling
Extract areas of significant higher and lower risks of diabetes
Polygonize the image of the log relative risk surface.
map_significant_areas(diab.incid$lrr.poly, laus$sectors)
Compare neighborhood characteristics between areas of reduced and higher risk of diabetes.
compare_risk_areas(diab.incid$lrr.ha, cov.env)
compare_risk_groups(diab.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 13088, p-value = 1.085e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 14875, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 13963, p-value = 1.327e-13
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 15860, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 12587, p-value = 8.971e-08
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 3855, p-value = 1.305e-14
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 13680, p-value = 2.905e-12
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 11397, p-value = 0.0003604
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 5366, p-value = 5.135e-08
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 11816, p-value = 2.443e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 14362, p-value = 1.245e-15
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 5961, p-value = 5.186e-06
## alternative hypothesis: true location shift is not equal to 0
Summary
While there is no evidence of global clustering of diabetes in Lausanne, we detected areas of significantly higher and lower risk.
Areas of higher risk:
Areas of lower risk:
Areas of higher risk are characterized by:
Should we rather compare with no significant areas (areas with no difference between observed and expected intensity of cases)?
diab.incid <- polygonize_logrr(diab.lrr, env, keep="Baseline risk")
compare_risk_areas(diab.incid$lrr.ha, cov.env)
compare_risk_groups(diab.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 54702, p-value = 0.0008831
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 59028, p-value = 1.564e-06
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 58102, p-value = 7.247e-06
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 61140, p-value = 3.313e-08
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 55312, p-value = 0.0004102
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 40712, p-value = 0.1465
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 49862, p-value = 0.09446
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 50444, p-value = 0.06136
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 32622, p-value = 2.494e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 55252, p-value = 0.0004297
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 62406, p-value = 2.575e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 35686, p-value = 0.00153
## alternative hypothesis: true location shift is not equal to 0
obesity.data <- select_outcome(indiv, "obesity", cov=cov.indiv)
## [1] "Outcome selected: obesity"
## [1] "Prevalence: 18.94"
plot_case_control(obesity.data, window=laus$extent, title='Obesity')
compare_spatial_dens(obesity.cases, obesity.controls)
## Scott's rule bandwidth for cases
## sigma.x sigma.y
## 413.8220 351.9734
## Scott's rule bandwidth for controls
## sigma.x sigma.y
## 320.3616 270.3460
obesity.lrr <- log_ratio_spatial_dens(obesity.events, sigma=350)
## case has been selected as the case group
k_func_diff(obesity.events)
## case has been selected as the case group
## case has been selected as the case group
## Generating 999 simulations by evaluating expression ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
##
## Done.
##
## Diggle and Chetwynd (1991) test for difference in K functions
##
## KD(r) = K_case(r) - K_control(r)
## case label: case
## control label: control
##
## null hypothesis: KD(r) = 0 for all r between 0 and 1299.884
## alternative hypothesis: KD(r) > 0 for at least one r between 0 and 1299.884
## test statistic: -244.3707
## p-value: 0.723
## nsim: 999
## simulation procedure: random labeling
obesity.incid <- polygonize_logrr(obesity.lrr, env, keep="Reduced risk")
map_significant_areas(obesity.incid$lrr.poly, laus$sectors)
compare_risk_areas(obesity.incid$lrr.ha, cov.env)
compare_risk_groups(obesity.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 19496, p-value = 1.847e-08
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 21957, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 23691, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 23914, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 19204, p-value = 1.137e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 9160, p-value = 7.367e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 17282, p-value = 0.001458
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 17040, p-value = 0.003561
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 8340, p-value = 2.271e-11
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 17708, p-value = 0.0002441
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 21906, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 10100, p-value = 2.082e-06
## alternative hypothesis: true location shift is not equal to 0
obesity.incid <- polygonize_logrr(obesity.lrr, env, keep="Baseline risk")
compare_risk_areas(obesity.incid$lrr.ha, cov.env)
compare_risk_groups(obesity.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 87986, p-value = 0.007019
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 99678, p-value = 1.11e-08
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 109682, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 104166, p-value = 6.361e-12
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 98508, p-value = 6.266e-08
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 86206, p-value = 0.02532
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 62972, p-value = 0.0001705
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 87442, p-value = 0.01061
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 51670, p-value = 2.462e-11
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 93826, p-value = 2.525e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 109996, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 60996, p-value = 1.963e-05
## alternative hypothesis: true location shift is not equal to 0
Summary
While there is no evidence of global clustering of obesity in Lausanne, we detected areas of significantly higher and lower risk.
Areas of higher risk:
Areas of lower risk:
If we compare characteristics of high-risk areas vs. reduced-risk areas (blue part:
If we compare characteristics of high-risk areas vs. baseline areas (white part): - higher population density (p=0.003) - higher environmental exposures (p<0.001) with both higher nighttime noise (p<0.001), PM2.5 (p<0.001) and NO2 (p<0.001) - lower greenspace (p=0.041) - lower access to sport facilities (p=0.042) - less pedestrian accidents (p<0.001) - higher socio-economic vulnerability (p=0.009) - higher unemployment rate (p<0.001) - higher rate of low education (p<0.001) - lower rate of people living alone (p=0.039) - lower income (p<0.001)
hypertension.data <- select_outcome(indiv, "hypertension", cov=cov.indiv)
## [1] "Outcome selected: hypertension"
## [1] "Prevalence: 47.64"
plot_case_control(hypertension.data, window=laus$extent, title='Hypertension')
compare_spatial_dens(hypertension.cases, hypertension.controls)
## Scott's rule bandwidth for cases
## sigma.x sigma.y
## 353.2211 297.8098
## Scott's rule bandwidth for controls
## sigma.x sigma.y
## 344.3534 290.9151
hypertension.lrr <- log_ratio_spatial_dens(hypertension.events, sigma=300)
## case has been selected as the case group
k_func_diff(hypertension.events)
## case has been selected as the case group
## case has been selected as the case group
## Generating 999 simulations by evaluating expression ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
##
## Done.
##
## Diggle and Chetwynd (1991) test for difference in K functions
##
## KD(r) = K_case(r) - K_control(r)
## case label: case
## control label: control
##
## null hypothesis: KD(r) = 0 for all r between 0 and 1299.884
## alternative hypothesis: KD(r) > 0 for at least one r between 0 and 1299.884
## test statistic: -207.8302
## p-value: 0.668
## nsim: 999
## simulation procedure: random labeling
hypertension.incid <- polygonize_logrr(hypertension.lrr, env, keep="Reduced risk")
map_significant_areas(hypertension.incid$lrr.poly, laus$sectors)
compare_risk_areas(hypertension.incid$lrr.ha, cov.env)
compare_risk_groups(hypertension.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 17249, p-value = 0.0006556
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 10047, p-value = 5.397e-06
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 10608, p-value = 8.552e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 8953.5, p-value = 8.535e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 10688, p-value = 0.0001228
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 20930, p-value = 7.754e-14
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 9509.5, p-value = 2.704e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 17618, p-value = 0.0001361
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 13294, p-value = 0.3364
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 16339, p-value = 0.01601
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 22860, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 9761, p-value = 1.146e-06
## alternative hypothesis: true location shift is not equal to 0
hypertension.incid <- polygonize_logrr(hypertension.lrr, env, keep="Baseline risk")
compare_risk_areas(hypertension.incid$lrr.ha, cov.env)
compare_risk_groups(hypertension.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 76776, p-value = 0.0366
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 63482, p-value = 0.1269
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 61996, p-value = 0.05348
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 60958, p-value = 0.02687
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 62212, p-value = 0.06116
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 79784, p-value = 0.003632
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 60284, p-value = 0.01653
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 77400, p-value = 0.02382
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 67860, p-value = 0.7374
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 72946, p-value = 0.2933
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 87004, p-value = 1.098e-06
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 62196, p-value = 0.06059
## alternative hypothesis: true location shift is not equal to 0
dyslipidemia.data <- select_outcome(indiv, "dyslipidemia", cov=cov.indiv)
## [1] "Outcome selected: dyslipidemia"
## [1] "Prevalence: 34.02"
plot_case_control(dyslipidemia.data, window=laus$extent, title='Dyslipidemia')
compare_spatial_dens(dyslipidemia.cases, dyslipidemia.controls)
## Scott's rule bandwidth for cases
## sigma.x sigma.y
## 367.5929 313.6160
## Scott's rule bandwidth for controls
## sigma.x sigma.y
## 334.7483 281.1877
dyslipidemia.lrr <- log_ratio_spatial_dens(dyslipidemia.events, sigma=300)
## case has been selected as the case group
k_func_diff(dyslipidemia.events)
## case has been selected as the case group
## case has been selected as the case group
## Generating 999 simulations by evaluating expression ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
##
## Done.
##
## Diggle and Chetwynd (1991) test for difference in K functions
##
## KD(r) = K_case(r) - K_control(r)
## case label: case
## control label: control
##
## null hypothesis: KD(r) = 0 for all r between 0 and 1299.884
## alternative hypothesis: KD(r) > 0 for at least one r between 0 and 1299.884
## test statistic: -206.509
## p-value: 0.714
## nsim: 999
## simulation procedure: random labeling
dyslipidemia.incid <- polygonize_logrr(dyslipidemia.lrr, env, keep="Reduced risk")
map_significant_areas(dyslipidemia.incid$lrr.poly, laus$sectors)
compare_risk_areas(dyslipidemia.incid$lrr.ha, cov.env)
compare_risk_groups(dyslipidemia.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 2938, p-value = 0.0128
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 3207, p-value = 0.0002722
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 3023.5, p-value = 0.004304
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 3348.5, p-value = 2.174e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 2820, p-value = 0.04726
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 1530, p-value = 0.0004102
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 2979.5, p-value = 0.007648
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 2993, p-value = 0.006441
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 1725, p-value = 0.006959
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 3198.5, p-value = 0.000299
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 3467.5, p-value = 1.979e-06
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 1606, p-value = 0.001336
## alternative hypothesis: true location shift is not equal to 0
dyslipidemia.incid <- polygonize_logrr(dyslipidemia.lrr, env, keep="Baseline risk")
compare_risk_areas(dyslipidemia.incid$lrr.ha, cov.env)
compare_risk_groups(dyslipidemia.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 38064, p-value = 0.5343
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 52531, p-value = 3.48e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 54467, p-value = 3.727e-11
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 52189, p-value = 7.363e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 48240, p-value = 1.429e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 36673, p-value = 0.91
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 41890, p-value = 0.04345
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 41548, p-value = 0.05819
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 30948, p-value = 0.04787
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 45730, p-value = 0.0006016
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 46678, p-value = 0.0001642
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 28462, p-value = 0.003894
## alternative hypothesis: true location shift is not equal to 0
morbi.data <- select_outcome(indiv, "morbidity", cov=cov.indiv)
## [1] "Outcome selected: morbidity"
## [1] "Prevalence: 65.58"
compare_spatial_dens(morbi.cases, morbi.controls)
## Scott's rule bandwidth for cases
## sigma.x sigma.y
## 336.6414 282.1557
## Scott's rule bandwidth for controls
## sigma.x sigma.y
## 363.4379 311.2998
morbi.lrr <- log_ratio_spatial_dens(morbi.events, sigma=300)
## case has been selected as the case group
k_func_diff(morbi.events)
## case has been selected as the case group
## case has been selected as the case group
## Generating 999 simulations by evaluating expression ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
##
## Done.
##
## Diggle and Chetwynd (1991) test for difference in K functions
##
## KD(r) = K_case(r) - K_control(r)
## case label: case
## control label: control
##
## null hypothesis: KD(r) = 0 for all r between 0 and 1299.884
## alternative hypothesis: KD(r) > 0 for at least one r between 0 and 1299.884
## test statistic: -543.777
## p-value: 0.917
## nsim: 999
## simulation procedure: random labeling
morbi.incid <- polygonize_logrr(morbi.lrr, env, keep="Reduced risk")
map_significant_areas(morbi.incid$lrr.poly, laus$sectors)
compare_risk_areas(morbi.incid$lrr.ha, cov.env)
compare_risk_groups(morbi.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 22678, p-value = 0.0004536
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 14791, p-value = 0.0002777
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 14398, p-value = 6.562e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 13294, p-value = 5.988e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 18152, p-value = 0.5543
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 28828, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 11049, p-value = 2.148e-12
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 25125, p-value = 1.048e-08
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 15792, p-value = 0.006358
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 23661, p-value = 1.067e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 32643, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 12201, p-value = 2.219e-09
## alternative hypothesis: true location shift is not equal to 0
morbi.incid <- polygonize_logrr(morbi.lrr, env, keep="Baseline risk")
compare_risk_areas(morbi.incid$lrr.ha, cov.env)
compare_risk_groups(morbi.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 108850, p-value = 0.0003994
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 108652, p-value = 0.0004757
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 109158, p-value = 0.0003038
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 107820, p-value = 0.0009649
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 111270, p-value = 4.063e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 99926, p-value = 0.1438
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 87818, p-value = 0.1744
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 116066, p-value = 1.78e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 80588, p-value = 0.002348
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 115300, p-value = 4.293e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 135296, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 71906, p-value = 4.101e-07
## alternative hypothesis: true location shift is not equal to 0
Summary
While there is no evidence of global clustering of diabetes in Lausanne, we detected areas of significantly higher and lower risk.
Areas of higher risk:
Areas of lower risk:
Areas of higher risk are characterized by:
Compared to diabetes, areas of higher risk of morbidity (all causes) do not cumulate socio-economic and environmental exposures. Lower risk areas correspond to highly urbanized neighborhood (higher pedestrian accidents, lower greenspace, higher air pollution) but are still of lower population density and lower socio-economic vulnerability than high-risk areas.
multimorbi.data <- select_outcome(indiv, "multimorbidity", cov=cov.indiv)
## [1] "Outcome selected: multimorbidity"
## [1] "Prevalence: 33.46"
plot_case_control(multimorbi.data, window=laus$extent, title='Multimorbidity')
compare_spatial_dens(multimorbi.cases, multimorbi.controls)
## Scott's rule bandwidth for cases
## sigma.x sigma.y
## 371.7545 315.6028
## Scott's rule bandwidth for controls
## sigma.x sigma.y
## 332.6419 279.9454
multimorbi.lrr <- log_ratio_spatial_dens(multimorbi.events, sigma=300)
## case has been selected as the case group
k_func_diff(multimorbi.events)
## case has been selected as the case group
## case has been selected as the case group
## Generating 999 simulations by evaluating expression ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
##
## Done.
##
## Diggle and Chetwynd (1991) test for difference in K functions
##
## KD(r) = K_case(r) - K_control(r)
## case label: case
## control label: control
##
## null hypothesis: KD(r) = 0 for all r between 0 and 1299.884
## alternative hypothesis: KD(r) > 0 for at least one r between 0 and 1299.884
## test statistic: -379.201
## p-value: 0.821
## nsim: 999
## simulation procedure: random labeling
multimorbi.incid <- polygonize_logrr(multimorbi.lrr, env, keep="Reduced risk")
map_significant_areas(multimorbi.incid$lrr.poly, laus$sectors)
compare_risk_areas(multimorbi.incid$lrr.ha, cov.env)
compare_risk_groups(multimorbi.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 21500, p-value = 3.308e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 22178, p-value = 3.721e-11
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 23878, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 23804, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 19629, p-value = 6.796e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 14922, p-value = 0.3816
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 19664, p-value = 5.833e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 19699, p-value = 5.001e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 10797, p-value = 2.846e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 20550, p-value = 7.505e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 25316, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 8624, p-value = 1.623e-13
## alternative hypothesis: true location shift is not equal to 0
multimorbi.incid <- polygonize_logrr(multimorbi.lrr, env, keep="Baseline risk")
compare_risk_areas(multimorbi.incid$lrr.ha, cov.env)
compare_risk_groups(multimorbi.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 101751, p-value = 2.151e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 107096, p-value = 2.727e-08
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 112242, p-value = 9.167e-12
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 114618, p-value = 1.346e-13
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 101940, p-value = 1.748e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 86041, p-value = 0.6897
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 88100, p-value = 0.3661
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 103430, p-value = 3.164e-06
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 60542, p-value = 4.971e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 108442, p-value = 3.6e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 120274, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 60309, p-value = 3.519e-09
## alternative hypothesis: true location shift is not equal to 0
polypharmacy.data <- select_outcome(indiv, "polypharmacy", cov=cov.indiv)
## [1] "Outcome selected: polypharmacy"
## [1] "Prevalence: 20.37"
plot_case_control(polypharmacy.data, window=laus$extent, title='Polypharmacy')
compare_spatial_dens(polypharmacy.cases, polypharmacy.controls)
## Scott's rule bandwidth for cases
## sigma.x sigma.y
## 390.2768 338.1501
## Scott's rule bandwidth for controls
## sigma.x sigma.y
## 325.4975 272.9566
polypharmacy.lrr <- log_ratio_spatial_dens(polypharmacy.events, sigma=350)
## case has been selected as the case group
k_func_diff(polypharmacy.events)
## case has been selected as the case group
## case has been selected as the case group
## Generating 999 simulations by evaluating expression ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
##
## Done.
##
## Diggle and Chetwynd (1991) test for difference in K functions
##
## KD(r) = K_case(r) - K_control(r)
## case label: case
## control label: control
##
## null hypothesis: KD(r) = 0 for all r between 0 and 1299.884
## alternative hypothesis: KD(r) > 0 for at least one r between 0 and 1299.884
## test statistic: 837.353
## p-value: 0.01
## nsim: 999
## simulation procedure: random labeling
polypharmacy.incid <- polygonize_logrr(polypharmacy.lrr, env, keep="Reduced risk")
map_significant_areas(polypharmacy.incid$lrr.poly, laus$sectors)
compare_risk_areas(polypharmacy.incid$lrr.ha, cov.env)
compare_risk_groups(polypharmacy.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 22669, p-value = 8.328e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 20540, p-value = 7.518e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 22494, p-value = 3.765e-15
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 21988, p-value = 2.419e-13
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 17113, p-value = 0.03362
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 16641, p-value = 0.1049
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 20898, p-value = 7.234e-10
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 20614, p-value = 4.69e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 10963, p-value = 9.329e-06
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 19932, p-value = 2.728e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 23884, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 8187, p-value = 1.443e-13
## alternative hypothesis: true location shift is not equal to 0
polypharmacy.incid <- polygonize_logrr(polypharmacy.lrr, env, keep="Baseline risk")
compare_risk_areas(polypharmacy.incid$lrr.ha, cov.env)
compare_risk_groups(polypharmacy.incid$lrr.ha, cov.env)
## PTOT
##
## Wilcoxon rank sum test with continuity correction
##
## data: PTOT by risk
## W = 114660, p-value = 2.291e-13
## alternative hypothesis: true location shift is not equal to 0
##
##
## ENV_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: ENV_INDEX by risk
## W = 109078, p-value = 2.488e-09
## alternative hypothesis: true location shift is not equal to 0
##
##
## NO2
##
## Wilcoxon rank sum test with continuity correction
##
## data: NO2 by risk
## W = 105988, p-value = 1.941e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## PM25
##
## Wilcoxon rank sum test with continuity correction
##
## data: PM25 by risk
## W = 117394, p-value = 1.234e-15
## alternative hypothesis: true location shift is not equal to 0
##
##
## NOISE
##
## Wilcoxon rank sum test with continuity correction
##
## data: NOISE by risk
## W = 92692, p-value = 0.05174
## alternative hypothesis: true location shift is not equal to 0
##
##
## GREEN_SP
##
## Wilcoxon rank sum test with continuity correction
##
## data: GREEN_SP by risk
## W = 68174, p-value = 4.807e-05
## alternative hypothesis: true location shift is not equal to 0
##
##
## N_ACC_PED
##
## Wilcoxon rank sum test with continuity correction
##
## data: N_ACC_PED by risk
## W = 119748, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
##
##
## SOC_ECO_INDEX
##
## Wilcoxon rank sum test with continuity correction
##
## data: SOC_ECO_INDEX by risk
## W = 107755, p-value = 1.721e-08
## alternative hypothesis: true location shift is not equal to 0
##
##
## SWISS
##
## Wilcoxon rank sum test with continuity correction
##
## data: SWISS by risk
## W = 71752, p-value = 0.001435
## alternative hypothesis: true location shift is not equal to 0
##
##
## UNEMPLOYMENT
##
## Wilcoxon rank sum test with continuity correction
##
## data: UNEMPLOYMENT by risk
## W = 104906, p-value = 7.356e-07
## alternative hypothesis: true location shift is not equal to 0
##
##
## LOW_EDUC
##
## Wilcoxon rank sum test with continuity correction
##
## data: LOW_EDUC by risk
## W = 111487, p-value = 5.646e-11
## alternative hypothesis: true location shift is not equal to 0
##
##
## INCOME
##
## Wilcoxon rank sum test with continuity correction
##
## data: INCOME by risk
## W = 55375, p-value = 5.915e-13
## alternative hypothesis: true location shift is not equal to 0